/**
 * @author gao
 * @date 2025/6/21 17:00
 */

public class Demo2 {
    public static void main(String[] args) throws InterruptedException {
        // 创建一个MyThread对象
        Thread thread = new MyThread();
        // 启动线程
        thread.start();

        while (true) {
            System.out.println("Hello Main!");
            // 休眠1000秒
            Thread.sleep(1000);
        }
    }
}